<%@ Page Language="C#" MasterPageFile="~/Administration/main.master" AutoEventWireup="true"
    CodeFile="StateProvinces.aspx.cs" Inherits="Tathata.Web.Administration.Administration_StateProvinces" %>

<asp:Content ID="c1" ContentPlaceHolderID="cph1" runat="Server">
    <table>
        <tr>
            <td class="adminTitle">
                Select country:
            </td>
            <td class="adminData">
                <asp:DropDownList ID="ddlCountry" runat="server" CssClass="adminInput" AutoPostBack="true"
                    OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
        </tr>
    </table>
    <br />
    <asp:GridView ID="gvStateProvinces" runat="server" AutoGenerateColumns="False" Width="100%">
        <Columns>
            <asp:BoundField DataField="StateProvinceID" HeaderText="StateProvinceID" Visible="False">
            </asp:BoundField>
            <asp:TemplateField HeaderText="Name" ItemStyle-Width="50%">
                <ItemTemplate>
                    <a href="StateProvinceDetails.aspx?StateProvinceID=<%#Eval("StateProvinceID")%>">
                        <%#Server.HtmlEncode(Eval("Name").ToString())%>
                    </a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Abbreviation" HeaderText="Abbreviation" HeaderStyle-HorizontalAlign="Center"
                ItemStyle-Width="16%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField DataField="DisplayOrder" HeaderText="Display order" HeaderStyle-HorizontalAlign="Center"
                ItemStyle-Width="16%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:TemplateField HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="16%"
                ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <a href="StateProvinceDetails.aspx?StateProvinceID=<%#Eval("StateProvinceID")%>">Edit
                    </a>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <br>
    <asp:Button ID="AddButton" runat="server" Text="Add" CssClass="adminButton" OnClick="AddButton_Click">
    </asp:Button>
    <br />
</asp:Content>
